package com.vehicle.util;

import java.time.Duration;
import java.time.LocalDateTime;

public class TimeUtilFormat {
    public  static String getTimeFormat(LocalDateTime time1,LocalDateTime time2){
        Duration duration = Duration.between(time1,time2);
        long days = duration.toDays();
        long hour = duration.toHours()-days*24;
        long minuts = duration.toMinutes()-days*24*60-hour*60;
        long miao = duration.getSeconds()-days*24*60*60-hour*60*60-minuts*60;
        String ss = days+"_"+hour+"_"+minuts+"_"+miao;
        return ss;
    }
}
